package cn.yitun.chat.yitunservercommonlib.converter.ot.file;

import cn.yitun.chat.yitunservercommonlib.dataentity.po.common.FileBaseData;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.userchat.UserHeadDataInfo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface UserHeadDataPoToBaseConverter {

    UserHeadDataPoToBaseConverter INSTANCE = Mappers.getMapper(UserHeadDataPoToBaseConverter.class);
//    @Mappings({
//            @Mapping(source = "parentId" ,target = "parentId" ),
//            @Mapping(source = "parentUrl" ,target = "parentUrl" ),
//            @Mapping(source = "parentName" ,target = "parentName" ),
//    })
    UserHeadDataInfo base2po(FileBaseData base);

    List<UserHeadDataInfo> base2po(List<FileBaseData> baseDataList);

    @InheritInverseConfiguration
    FileBaseData po2base(UserHeadDataInfo vo);
    @InheritInverseConfiguration
    List<FileBaseData> po2base(List<UserHeadDataInfo> voList);
}
